home *** CD-ROM | disk | FTP | other *** search
/ IRIX Development Foundation 1.1 for IRIX 6.2 / SGI IRIX 6.2 Development Foundation 1.1.iso / dist / patchSG0001645.idb / usr / include / semaphore.h.z / semaphore.h
C/C++ Source or Header  |  1997-07-01  |  2KB  |  63 lines

  1. /*
  2.  * Copyright 1995, Silicon Graphics, Inc. 
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or 
  7.  * duplicated in any form, in whole or in part, without the prior written 
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions 
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or 
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - 
  15.  * rights reserved under the Copyright Lanthesaws of the United States.
  16.  */
  17. #ident "$Id: semaphore.h,v 1.9 1997/06/20 23:50:29 jph Exp $"
  18.  
  19. #ifndef __SEMAPHORE_H__
  20. #define __SEMAPHORE_H__
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. /*
  27.  * Interface definition file for POSIX 1003.1b semaphores
  28.  */
  29.  
  30. #include <sys/types.h>
  31. #include <stdio.h>
  32. #include <fcntl.h>
  33.  
  34. #ifndef _SEM_SGI_INTERNAL
  35. typedef struct sem_s {
  36.     __uint64_t    sem_reserved[8];
  37. } sem_t;
  38. #endif
  39.  
  40. /*
  41.  * sem_mode commands
  42.  */
  43. #define SEM_MODE_SPINSET    12
  44.  
  45. /*
  46.  * Semaphore interface prototypes
  47.  */
  48. int sem_init(sem_t *, int, unsigned int);
  49. int sem_destroy(sem_t *);
  50. sem_t *sem_open(const char *, int, ...);
  51. int sem_close(sem_t *);
  52. int sem_unlink(const char *);
  53. int sem_wait(sem_t *);
  54. int sem_trywait(sem_t *);
  55. int sem_post(sem_t *);
  56. int sem_getvalue(sem_t *, int *);
  57. int sem_mode(sem_t *, int, ...);
  58.  
  59. #ifdef __cplusplus
  60. }
  61. #endif
  62. #endif /* __SEMAPHORE_H__ */
  63.